package com.mv.controller;

import com.mv.pojo.Exchange;
import com.mv.service.ExchangeService;
import com.mv.vo.Form;
import com.mv.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/mv")
public class ExchangeController {
    @Autowired
    private ExchangeService exchangeService;
    @GetMapping("/exchange/getExchangeList")
    public SysResult getExchangeList(){
        List<Exchange> exchangeList=exchangeService.getExchangeList();
        return SysResult.success(exchangeList);
    }
    @PostMapping("/exchange/saveExchange")
    public SysResult saveExchange(@RequestBody Form form){
        exchangeService.saveExchange(form);
        return SysResult.success();
    }
}
